package com.coding4play.mqtt.store.config;

import org.springframework.data.redis.core.*;

public class RedisTemplateWrapper {

    protected final RedisTemplate<String, Object> redisTemplate;

    protected HashOperations<String, String, Object> HASH;
    protected SetOperations<String, Object> SET;
    protected ZSetOperations<String, Object> ZSET;
    protected ValueOperations<String, Object> KV;

    public RedisTemplateWrapper(RedisTemplate<String, Object> redisTemplate) {
        this.redisTemplate = redisTemplate;
        this.HASH = redisTemplate.opsForHash();
        this.SET = redisTemplate.opsForSet();
        this.ZSET = redisTemplate.opsForZSet();
        this.KV = redisTemplate.opsForValue();
    }
}
